--Dupe Compatibilty
	local Clamp = math.Clamp
	local function SetMass( Player, Entity, Data )
		if not SERVER then return end

		if Data.Mass then
			local physobj = Entity:GetPhysicsObject()
			if physobj:IsValid() then physobj:SetMass(Data.Mass) end
		end

		duplicator.StoreEntityModifier( Entity, "mass", Data )
	end
	duplicator.RegisterEntityModifier( "mass", SetMass )
	
	e2function void setMass(mass)
		if not validPhysics(self.entity) then return end
		local mass = Clamp(mass, 0.001, 50000)
		--local phys = self.entity:GetPhysicsObject()
		--phys:SetMass(mass)
		SetMass( self.player , self.entity , { Mass = mass } )
	end

	e2function void entity:setMass(mass)
		if not validPhysics(this) then return end
		if not isOwner(self, this) then return end
		if(this:IsPlayer()) then return end
		local mass = Clamp(mass, 0.001, 50000)
		--local phys = this:GetPhysicsObject()
		--phys:SetMass(mass)
		SetMass( self.player , this , { Mass = mass } )
	end